<!-- 打印 -->
<template>
  <div>
    <h1>实现打印</h1>
    <div class="part part-1">
      <h2>简单打印，不带样式：</h2>
      <el-button @click="printSimple">简单打印</el-button>
    </div>
  </div>
</template>

<script>
  export default {
    name: "print",
    data() {
      return {

      }
    },
    methods: {
      printSimple() {
        const content = '<img src="https://images.pexels.com/photos/4113831/pexels-photo-4113831.jpeg?auto=compress&cs=tinysrgb&w=600&lazy=load" />'
        const iframe = document.createElement('iframe');
        iframe.style = 'visibility: hidden';
        iframe.contentWindow
      }
    }
  }
</script>

<style scoped>

</style>
